package com.hzjy.manage.service.impl;

import com.hzjy.manage.mapper.AuditRecordMapper;
import com.hzjy.manage.vo.AuditRecord;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AuditRecordServiceImpl {
    @Autowired
    private AuditRecordMapper auditRecordMapper;

    /**
     * 根据ID查询记录
     * @param auditId
     * @return
     */
    public AuditRecord selectAuditRecordById(Long auditId){
        return auditRecordMapper.selectAuditRecordById(auditId);
    }

    /**
     * 获取works_id下的所有审核记录
     * @param worksId
     * @return
     */
    public List<AuditRecord> selectAuditRecordList(Long worksId){
        return auditRecordMapper.selectAuditRecordList(worksId);
    }

    /**
     * 新增审核记录
     * @param auditRecord
     */
    public Long insertAuditRecord(AuditRecord auditRecord){
        return auditRecordMapper.insertAuditRecord(auditRecord);

    }
}
